<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>document2html: src/libs/tools.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">document2html
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Documents to HTML converter</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('tools_8cpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">tools.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;chrono&gt;</code><br />
<code>#include &lt;ctime&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;mutex&gt;</code><br />
<code>#include &lt;sstream&gt;</code><br />
<code>#include &lt;sys/stat.h&gt;</code><br />
<code>#include &lt;thread&gt;</code><br />
<code>#include &quot;<a class="el" href="tools_8hpp_source.html">tools.hpp</a>&quot;</code><br />
<code>#include &lt;dirent.h&gt;</code><br />
<code>#include &lt;limits.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacetools"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html">tools</a></td></tr>
<tr class="memdesc:namespacetools"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper functions (strings, files, etc.) <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Files</div></td></tr>
<tr class="memitem:a279dbca90c35b1c2ffacd5ae992c7de4"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a279dbca90c35b1c2ffacd5ae992c7de4">tools::absolutePath</a> (const std::string &amp;fileName)</td></tr>
<tr class="memdesc:a279dbca90c35b1c2ffacd5ae992c7de4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get absolute file path.  <a href="namespacetools.html#a279dbca90c35b1c2ffacd5ae992c7de4">More...</a><br /></td></tr>
<tr class="separator:a279dbca90c35b1c2ffacd5ae992c7de4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93d143f93cbc27e9fa0b33ee540cb223"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a93d143f93cbc27e9fa0b33ee540cb223">tools::os_rmdir</a> (const char *dir)</td></tr>
<tr class="memdesc:a93d143f93cbc27e9fa0b33ee540cb223"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rmdir realisation depending on OS.  <a href="namespacetools.html#a93d143f93cbc27e9fa0b33ee540cb223">More...</a><br /></td></tr>
<tr class="separator:a93d143f93cbc27e9fa0b33ee540cb223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78f14ccae7c9f8268d740f27181bfc68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a78f14ccae7c9f8268d740f27181bfc68">tools::os_mkdir</a> (const char *dir)</td></tr>
<tr class="memdesc:a78f14ccae7c9f8268d740f27181bfc68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mkdir realisation depending on OS.  <a href="namespacetools.html#a78f14ccae7c9f8268d740f27181bfc68">More...</a><br /></td></tr>
<tr class="separator:a78f14ccae7c9f8268d740f27181bfc68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadd4385b8bfaf6de5ed567c40c4b6862"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#aadd4385b8bfaf6de5ed567c40c4b6862">tools::os_mkdtemp</a> (char *dir)</td></tr>
<tr class="memdesc:aadd4385b8bfaf6de5ed567c40c4b6862"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mkdtemp realisation depending on OS.  <a href="namespacetools.html#aadd4385b8bfaf6de5ed567c40c4b6862">More...</a><br /></td></tr>
<tr class="separator:aadd4385b8bfaf6de5ed567c40c4b6862"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08f0fc2373dac29ac2f465e214ad5e8e"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a08f0fc2373dac29ac2f465e214ad5e8e">tools::getProgramPath</a> ()</td></tr>
<tr class="memdesc:a08f0fc2373dac29ac2f465e214ad5e8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current executable file directory to make absolute path.  <a href="namespacetools.html#a08f0fc2373dac29ac2f465e214ad5e8e">More...</a><br /></td></tr>
<tr class="separator:a08f0fc2373dac29ac2f465e214ad5e8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad5d7ef4f195ddf921a9d767ef7c1f83"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#aad5d7ef4f195ddf921a9d767ef7c1f83">tools::isDirectory</a> (const std::string &amp;path)</td></tr>
<tr class="memdesc:aad5d7ef4f195ddf921a9d767ef7c1f83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if path is directory.  <a href="namespacetools.html#aad5d7ef4f195ddf921a9d767ef7c1f83">More...</a><br /></td></tr>
<tr class="separator:aad5d7ef4f195ddf921a9d767ef7c1f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac746b599f8c902bb76e82c3200fc9562"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ac746b599f8c902bb76e82c3200fc9562">tools::createDir</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:ac746b599f8c902bb76e82c3200fc9562"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively create directory.  <a href="namespacetools.html#ac746b599f8c902bb76e82c3200fc9562">More...</a><br /></td></tr>
<tr class="separator:ac746b599f8c902bb76e82c3200fc9562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa84f46f23807afb5657576f33866fcb5"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#aa84f46f23807afb5657576f33866fcb5">tools::createTempDir</a> ()</td></tr>
<tr class="memdesc:aa84f46f23807afb5657576f33866fcb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create temp directory.  <a href="namespacetools.html#aa84f46f23807afb5657576f33866fcb5">More...</a><br /></td></tr>
<tr class="separator:aa84f46f23807afb5657576f33866fcb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a038d4029abc7692fb9e6606089d8ca5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a038d4029abc7692fb9e6606089d8ca5b">tools::deleteDir</a> (const std::string &amp;name, bool deleteSelf=true)</td></tr>
<tr class="memdesc:a038d4029abc7692fb9e6606089d8ca5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively delete directory.  <a href="namespacetools.html#a038d4029abc7692fb9e6606089d8ca5b">More...</a><br /></td></tr>
<tr class="separator:a038d4029abc7692fb9e6606089d8ca5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af03096f8531c055ad3cd70817ea253e0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#af03096f8531c055ad3cd70817ea253e0">tools::fileExists</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:af03096f8531c055ad3cd70817ea253e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if file exists.  <a href="namespacetools.html#af03096f8531c055ad3cd70817ea253e0">More...</a><br /></td></tr>
<tr class="separator:af03096f8531c055ad3cd70817ea253e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1af504bf51df5e32b8e74b11a94b6b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ab1af504bf51df5e32b8e74b11a94b6b6">tools::moveFile</a> (const std::string &amp;oldDir, const std::string &amp;oldName, const std::string &amp;newDir, const std::string &amp;newName)</td></tr>
<tr class="memdesc:ab1af504bf51df5e32b8e74b11a94b6b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move file.  <a href="namespacetools.html#ab1af504bf51df5e32b8e74b11a94b6b6">More...</a><br /></td></tr>
<tr class="separator:ab1af504bf51df5e32b8e74b11a94b6b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2230fe6af4f64a23efb4c8723848839c"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a2230fe6af4f64a23efb4c8723848839c">tools::getFileNameFromPath</a> (const std::string &amp;path)</td></tr>
<tr class="memdesc:a2230fe6af4f64a23efb4c8723848839c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get file name from path (without extension)  <a href="namespacetools.html#a2230fe6af4f64a23efb4c8723848839c">More...</a><br /></td></tr>
<tr class="separator:a2230fe6af4f64a23efb4c8723848839c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a812e001de085f32b853874c7d08fa076"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a812e001de085f32b853874c7d08fa076">tools::getBaseDir</a> (std::string str1, std::string str2)</td></tr>
<tr class="memdesc:a812e001de085f32b853874c7d08fa076"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get get base directory for 2 files.  <a href="namespacetools.html#a812e001de085f32b853874c7d08fa076">More...</a><br /></td></tr>
<tr class="separator:a812e001de085f32b853874c7d08fa076"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a736dbe10baa23bd1f164ee5b9c9893b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a736dbe10baa23bd1f164ee5b9c9893b1">tools::getFileCount</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a736dbe10baa23bd1f164ee5b9c9893b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get amount of files in directory.  <a href="namespacetools.html#a736dbe10baa23bd1f164ee5b9c9893b1">More...</a><br /></td></tr>
<tr class="separator:a736dbe10baa23bd1f164ee5b9c9893b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Strings</div></td></tr>
<tr class="memitem:ac16b995cc07db91da70d0f7c14c0447a"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ac16b995cc07db91da70d0f7c14c0447a">tools::trim</a> (const std::string &amp;str, const std::string &amp;delimiter=&quot; \\\\\0B&quot;)</td></tr>
<tr class="memdesc:ac16b995cc07db91da70d0f7c14c0447a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove whitespaces and other characters from both sides of string (std::string)  <a href="namespacetools.html#ac16b995cc07db91da70d0f7c14c0447a">More...</a><br /></td></tr>
<tr class="separator:ac16b995cc07db91da70d0f7c14c0447a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a048fe42e40e4032ceb2eb1442854591a"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a048fe42e40e4032ceb2eb1442854591a">tools::trim</a> (const std::wstring &amp;str, const std::wstring &amp;delimiter=L&quot; \\\\\0B&quot;)</td></tr>
<tr class="memdesc:a048fe42e40e4032ceb2eb1442854591a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove whitespaces and other characters from both sides of string (std::wstring)  <a href="namespacetools.html#a048fe42e40e4032ceb2eb1442854591a">More...</a><br /></td></tr>
<tr class="separator:a048fe42e40e4032ceb2eb1442854591a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8e5ba98daed76b7d7e715d4d0139841"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#af8e5ba98daed76b7d7e715d4d0139841">tools::ltrim</a> (const std::string &amp;str, const std::string &amp;delimiter=&quot; \\\\\0B&quot;)</td></tr>
<tr class="memdesc:af8e5ba98daed76b7d7e715d4d0139841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove whitespaces and other characters from begining of string.  <a href="namespacetools.html#af8e5ba98daed76b7d7e715d4d0139841">More...</a><br /></td></tr>
<tr class="separator:af8e5ba98daed76b7d7e715d4d0139841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f94493c0844d8d9ab256dcb57b0c39c"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a3f94493c0844d8d9ab256dcb57b0c39c">tools::rtrim</a> (const std::string &amp;str, const std::string &amp;delimiter=&quot; \\\\\0B&quot;)</td></tr>
<tr class="memdesc:a3f94493c0844d8d9ab256dcb57b0c39c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove whitespaces and other characters from end of string.  <a href="namespacetools.html#a3f94493c0844d8d9ab256dcb57b0c39c">More...</a><br /></td></tr>
<tr class="separator:a3f94493c0844d8d9ab256dcb57b0c39c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab30cbe8ad8776fddd6e4816ee620366f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ab30cbe8ad8776fddd6e4816ee620366f">tools::lpad</a> (const std::string &amp;str, size_t length, char filler)</td></tr>
<tr class="memdesc:ab30cbe8ad8776fddd6e4816ee620366f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pad string to a certain length with another string (from left)  <a href="namespacetools.html#ab30cbe8ad8776fddd6e4816ee620366f">More...</a><br /></td></tr>
<tr class="separator:ab30cbe8ad8776fddd6e4816ee620366f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acecb100f4bf2747804ab45555d784594"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#acecb100f4bf2747804ab45555d784594">tools::rpad</a> (const std::string &amp;str, size_t length, char filler)</td></tr>
<tr class="memdesc:acecb100f4bf2747804ab45555d784594"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pad string to a certain length with another string (from right)  <a href="namespacetools.html#acecb100f4bf2747804ab45555d784594">More...</a><br /></td></tr>
<tr class="separator:acecb100f4bf2747804ab45555d784594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae17fcc35226bbc1ad81d2c490dc0732a"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ae17fcc35226bbc1ad81d2c490dc0732a">tools::replace</a> (const std::string &amp;str, const std::string &amp;to, int offset, int length)</td></tr>
<tr class="memdesc:ae17fcc35226bbc1ad81d2c490dc0732a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace subtring which starts at <code>offset</code> and has size of <code>length</code>  <a href="namespacetools.html#ae17fcc35226bbc1ad81d2c490dc0732a">More...</a><br /></td></tr>
<tr class="separator:ae17fcc35226bbc1ad81d2c490dc0732a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c56e3d7995198cb7e5dc25cad97f553"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a5c56e3d7995198cb7e5dc25cad97f553">tools::replaceAll</a> (std::string &amp;str, const std::string &amp;from, const std::string &amp;to)</td></tr>
<tr class="memdesc:a5c56e3d7995198cb7e5dc25cad97f553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace all occurrences of substring (std::string)  <a href="namespacetools.html#a5c56e3d7995198cb7e5dc25cad97f553">More...</a><br /></td></tr>
<tr class="separator:a5c56e3d7995198cb7e5dc25cad97f553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a69ae18732470640e3391d30cf6aed8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a0a69ae18732470640e3391d30cf6aed8">tools::replaceAll</a> (std::wstring &amp;str, const std::wstring &amp;from, const std::wstring &amp;to)</td></tr>
<tr class="memdesc:a0a69ae18732470640e3391d30cf6aed8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace all occurrences of substring (std::wstring)  <a href="namespacetools.html#a0a69ae18732470640e3391d30cf6aed8">More...</a><br /></td></tr>
<tr class="separator:a0a69ae18732470640e3391d30cf6aed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6614cb21fa66108a755cdae14b6a7e35"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a6614cb21fa66108a755cdae14b6a7e35">tools::replaceAll2</a> (std::string str, const std::string &amp;from, const std::string &amp;to)</td></tr>
<tr class="memdesc:a6614cb21fa66108a755cdae14b6a7e35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace all occurrences of substring.  <a href="namespacetools.html#a6614cb21fa66108a755cdae14b6a7e35">More...</a><br /></td></tr>
<tr class="separator:a6614cb21fa66108a755cdae14b6a7e35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0fdb118719e9f676f159a6840b288f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a7e0fdb118719e9f676f159a6840b288f">tools::findNth</a> (const std::string &amp;str, const char delimiter, const int occurrence)</td></tr>
<tr class="memdesc:a7e0fdb118719e9f676f159a6840b288f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth occurrence of symbol in string (std::string)  <a href="namespacetools.html#a7e0fdb118719e9f676f159a6840b288f">More...</a><br /></td></tr>
<tr class="separator:a7e0fdb118719e9f676f159a6840b288f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4df0a799d3d394ed0757efa84d4ccc67"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a4df0a799d3d394ed0757efa84d4ccc67">tools::findNth</a> (const std::wstring &amp;str, const wchar_t delimiter, const int occurrence)</td></tr>
<tr class="memdesc:a4df0a799d3d394ed0757efa84d4ccc67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth occurrence of symbol in string (std::wstring)  <a href="namespacetools.html#a4df0a799d3d394ed0757efa84d4ccc67">More...</a><br /></td></tr>
<tr class="separator:a4df0a799d3d394ed0757efa84d4ccc67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b53587ce4ba82bea2cf2759be88032"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a56b53587ce4ba82bea2cf2759be88032">tools::findNth</a> (const std::wstring &amp;str, const std::wstring &amp;delimiter, const int occurrence)</td></tr>
<tr class="memdesc:a56b53587ce4ba82bea2cf2759be88032"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth occurrence of substring in string (std::wstring)  <a href="namespacetools.html#a56b53587ce4ba82bea2cf2759be88032">More...</a><br /></td></tr>
<tr class="separator:a56b53587ce4ba82bea2cf2759be88032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef59e44bf21c1c81cfa646a57465270"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a4ef59e44bf21c1c81cfa646a57465270">tools::rfindNth</a> (const std::string &amp;str, const char delimiter, const int occurrence)</td></tr>
<tr class="memdesc:a4ef59e44bf21c1c81cfa646a57465270"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth from right occurrence of symbol in string (std::string)  <a href="namespacetools.html#a4ef59e44bf21c1c81cfa646a57465270">More...</a><br /></td></tr>
<tr class="separator:a4ef59e44bf21c1c81cfa646a57465270"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcf2d4db3ce043863733189f1a42420b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#abcf2d4db3ce043863733189f1a42420b">tools::rfindNth</a> (const std::wstring &amp;str, const wchar_t delimiter, const int occurrence)</td></tr>
<tr class="memdesc:abcf2d4db3ce043863733189f1a42420b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth from right occurrence of symbol in string (std::wstring)  <a href="namespacetools.html#abcf2d4db3ce043863733189f1a42420b">More...</a><br /></td></tr>
<tr class="separator:abcf2d4db3ce043863733189f1a42420b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add4f0fc38e60fd0d07da003ae82cb4ab"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#add4f0fc38e60fd0d07da003ae82cb4ab">tools::rfindNth</a> (const std::wstring &amp;str, const std::wstring &amp;delimiter, const int occurrence)</td></tr>
<tr class="memdesc:add4f0fc38e60fd0d07da003ae82cb4ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find nth from right occurrence of substring in string (std::wstring)  <a href="namespacetools.html#add4f0fc38e60fd0d07da003ae82cb4ab">More...</a><br /></td></tr>
<tr class="separator:add4f0fc38e60fd0d07da003ae82cb4ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac03eaa83b0a39beabcb923cb36924026"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ac03eaa83b0a39beabcb923cb36924026">tools::repeatString</a> (const std::string &amp;str, int times)</td></tr>
<tr class="memdesc:ac03eaa83b0a39beabcb923cb36924026"><td class="mdescLeft">&#160;</td><td class="mdescRight">Repeat string several times.  <a href="namespacetools.html#ac03eaa83b0a39beabcb923cb36924026">More...</a><br /></td></tr>
<tr class="separator:ac03eaa83b0a39beabcb923cb36924026"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0897389c0ea572323c0bf049c7079495"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a0897389c0ea572323c0bf049c7079495">tools::explode</a> (const std::string &amp;str, const char delimiter)</td></tr>
<tr class="memdesc:a0897389c0ea572323c0bf049c7079495"><td class="mdescLeft">&#160;</td><td class="mdescRight">Split string by delimiter.  <a href="namespacetools.html#a0897389c0ea572323c0bf049c7079495">More...</a><br /></td></tr>
<tr class="separator:a0897389c0ea572323c0bf049c7079495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a046a3934ffb58a05891bf07e4a1b31ed"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a046a3934ffb58a05891bf07e4a1b31ed">tools::explode</a> (std::string str, const std::string &amp;delimiterList, bool skipEmpty=false)</td></tr>
<tr class="memdesc:a046a3934ffb58a05891bf07e4a1b31ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Split string by delimiter.  <a href="namespacetools.html#a046a3934ffb58a05891bf07e4a1b31ed">More...</a><br /></td></tr>
<tr class="separator:a046a3934ffb58a05891bf07e4a1b31ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adec99d68dfd7fb177e484fbe44ca55fc"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#adec99d68dfd7fb177e484fbe44ca55fc">tools::join</a> (const std::vector&lt; std::string &gt; &amp;strList, const std::string &amp;delimiter=&quot;&quot;)</td></tr>
<tr class="memdesc:adec99d68dfd7fb177e484fbe44ca55fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Split string by delimiter.  <a href="namespacetools.html#adec99d68dfd7fb177e484fbe44ca55fc">More...</a><br /></td></tr>
<tr class="separator:adec99d68dfd7fb177e484fbe44ca55fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7104755a2ae0879f81358d8f68bcde5f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a7104755a2ae0879f81358d8f68bcde5f">tools::endsWith</a> (const std::string &amp;str, const std::string &amp;ending)</td></tr>
<tr class="memdesc:a7104755a2ae0879f81358d8f68bcde5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if string ends with substring.  <a href="namespacetools.html#a7104755a2ae0879f81358d8f68bcde5f">More...</a><br /></td></tr>
<tr class="separator:a7104755a2ae0879f81358d8f68bcde5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25a60f8bb5dd9a075b021d6a4e438452"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a25a60f8bb5dd9a075b021d6a4e438452">tools::xorEncrypt</a> (const std::string &amp;str, const std::string &amp;key)</td></tr>
<tr class="memdesc:a25a60f8bb5dd9a075b021d6a4e438452"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypted / decrypted string with XOR method.  <a href="namespacetools.html#a25a60f8bb5dd9a075b021d6a4e438452">More...</a><br /></td></tr>
<tr class="separator:a25a60f8bb5dd9a075b021d6a4e438452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">XML</div></td></tr>
<tr class="memitem:a26aa8d9f909d6c8d11852b37cb5166df"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a26aa8d9f909d6c8d11852b37cb5166df">tools::xmlChildrenCount</a> (const pugi::xml_node &amp;node, const std::string &amp;childName=&quot;&quot;)</td></tr>
<tr class="memdesc:a26aa8d9f909d6c8d11852b37cb5166df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get XML-node count of children with specific name.  <a href="namespacetools.html#a26aa8d9f909d6c8d11852b37cb5166df">More...</a><br /></td></tr>
<tr class="separator:a26aa8d9f909d6c8d11852b37cb5166df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf23ee26ba91300dd31ced19280c15da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#aaf23ee26ba91300dd31ced19280c15da">tools::xmlDeleteAllChildren</a> (pugi::xml_node &amp;node)</td></tr>
<tr class="memdesc:aaf23ee26ba91300dd31ced19280c15da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all children.  <a href="namespacetools.html#aaf23ee26ba91300dd31ced19280c15da">More...</a><br /></td></tr>
<tr class="separator:aaf23ee26ba91300dd31ced19280c15da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Other</div></td></tr>
<tr class="memitem:a03bccb109556c3cc851ca881d4227628"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a03bccb109556c3cc851ca881d4227628">tools::sleep</a> (int time)</td></tr>
<tr class="memdesc:a03bccb109556c3cc851ca881d4227628"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sleep for N sec.  <a href="namespacetools.html#a03bccb109556c3cc851ca881d4227628">More...</a><br /></td></tr>
<tr class="separator:a03bccb109556c3cc851ca881d4227628"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eafdc7698deb51a97ce77b18e1df3f7"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a7eafdc7698deb51a97ce77b18e1df3f7">tools::getTime</a> (const char *format=&quot;%d.%m.%Y %H:%M:%S&quot;)</td></tr>
<tr class="memdesc:a7eafdc7698deb51a97ce77b18e1df3f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get system current time.  <a href="namespacetools.html#a7eafdc7698deb51a97ce77b18e1df3f7">More...</a><br /></td></tr>
<tr class="separator:a7eafdc7698deb51a97ce77b18e1df3f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a836636e7d8a3ccb5badeaf762c4b42cc"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a836636e7d8a3ccb5badeaf762c4b42cc">tools::intToHex</a> (int number, size_t length)</td></tr>
<tr class="memdesc:a836636e7d8a3ccb5badeaf762c4b42cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert number to hex string.  <a href="namespacetools.html#a836636e7d8a3ccb5badeaf762c4b42cc">More...</a><br /></td></tr>
<tr class="separator:a836636e7d8a3ccb5badeaf762c4b42cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a672f57c9990f20ef9e912de5ec431a6b"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a672f57c9990f20ef9e912de5ec431a6b">tools::hexCharToDec</a> (char c)</td></tr>
<tr class="memdesc:a672f57c9990f20ef9e912de5ec431a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert hex char to dec number.  <a href="namespacetools.html#a672f57c9990f20ef9e912de5ec431a6b">More...</a><br /></td></tr>
<tr class="separator:a672f57c9990f20ef9e912de5ec431a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:af2ab81a2db88207333112a1bc3d80f6c"><td class="memItemLeft" align="right" valign="top"><a id="af2ab81a2db88207333112a1bc3d80f6c"></a>
std::mutex&#160;</td><td class="memItemRight" valign="bottom"><b>tools::MUTEX</b></td></tr>
<tr class="separator:af2ab81a2db88207333112a1bc3d80f6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51f38bc43c9a878b906703f51cf2f863"><td class="memItemLeft" align="right" valign="top">const bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#a51f38bc43c9a878b906703f51cf2f863">tools::IS_WINDOWS</a> = false</td></tr>
<tr class="separator:a51f38bc43c9a878b906703f51cf2f863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade3ce95f9eb4fd3ecf79d48bddc67549"><td class="memItemLeft" align="right" valign="top">const bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetools.html#ade3ce95f9eb4fd3ecf79d48bddc67549">tools::IS_MAC</a> = false</td></tr>
<tr class="separator:ade3ce95f9eb4fd3ecf79d48bddc67549"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>dmryutov (<a href="#" onclick="location.href='mai'+'lto:'+'dmr'+'yu'+'tov'+'@g'+'mai'+'l.'+'com'; return false;">dmryu<span style="display: none;">.nosp@m.</span>tov@<span style="display: none;">.nosp@m.</span>gmail<span style="display: none;">.nosp@m.</span>.com</a>) </dd></dl>
<dl class="section date"><dt>Date</dt><dd>04.09.2016 &ndash; 10.11.2017 </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_87a455bccb09a92130c26a11a880c98a.html">libs</a></li><li class="navelem"><a class="el" href="tools_8cpp.html">tools.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
